﻿toggle = function (fsid)
{
    var div = $id("div_" + fsid);
    
        
    var display = "";
    
    if( div.style.display != "none" )
    {
        display = "none";
    }
    
    div.style.display = display;
    
}
Filter = function()
{
    var lovhCAR = $id("lovh_SLA.CARID");
    var CAR = lovhCAR.value;
    var lovhCompany = $id("lovh_SLA.CUSTOMERID");
    var Company = lovhCompany.value;
    var Start = $id("SLA.START").value;
    var End = $id("SLA.END").value;
    dgSLA_c.PerformCallback("FILTER" + DELIMITER + Company + DELIMITER + CAR + DELIMITER + Start + DELIMITER + End);
}
All = function()
{
    var lovhCompany = $id("lovh_SLA.CUSTOMERID");
    var lovCompany = $id("lov_SLA.CUSTOMERID");
    var lovCAR = $id("lov_SLA.CARID");
    var lovhCAR = $id("lovh_SLA.CARID");
    //var lovpCAR = $id("lovp_SLA.CARID");
    var lovpCompany = $id("lovp_SLA.CUSTOMERID");
    var Start = $id("SLA.START");
    var End = $id("SLA.END");
    lovhCompany.value = "";
    lovCAR.value = "";
    lovhCAR.value = "";
    //lovpCAR.value = "";
    lovpCompany.value = "";
    lovCompany.value = "";
    Start.value = "";
    End.value = "";
    dgSLA_c.PerformCallback("ALL");
}
dgSLA_c_EndCallback = function(e)
{
}

//SelectCompany = function()
//{
//    var lovhCompany = $id("lovh_SLA.CUSTOMERID");
//    var lovpCAR = $id("lovp_SLA.CARID");
//    var lovCAR = $id("lov_SLA.CARID");
//    var lovhCAR = $id("lovh_SLA.CARID");
//    
//    if(lovpCAR.value != lovhCAR.value )
//    {    
//        lovCAR.value = "";
//        lovhCAR.value = "";
//    }
//    
//    lovpCAR.value = lovhCompany.value;
//}
SelectCAR = function()
{
    var lovhCAR = $id("lovh_SLA.CARID");
    var lovpCompany = $id("lovp_SLA.CUSTOMERID");
    var lovCompany = $id("lov_SLA.CUSTOMERID");
    var lovhCompany = $id("lovh_SLA.CUSTOMERID");
    
    if(lovpCompany.value != lovhCompany.value )
    {    
        lovCompany.value = "";
        lovhCompany.value = "";
    }
    lovpCompany.value = lovhCAR.value;
}

